import type { MessageType } from './types'

const msgClasses: Record<MessageType, string> = {
  info: 'is-info',
  success: 'is-success',
  warn: 'is-warning',
  error: 'is-danger'
}

const msgIcons: Record<MessageType, string> = {
  info: 'mas-icon-info',
  success: 'mas-icon-sucess',
  warn: 'mas-icon-caution',
  error: 'mas-icon-error'
}
const msgFilledIcons: Record<MessageType, string> = {
  info: 'mas-icon-info-filled',
  success: 'mas-icon-sucess-filled',
  warn: 'mas-icon-caution-filled',
  error: 'mas-icon-error-filled'
}

export function messageIconOf(type: MessageType) {
  return msgIcons[type]
}

export function messageFilledIconOf(type: MessageType) {
  return msgFilledIcons[type]
}

export function messageClassOf(type: MessageType) {
  return msgClasses[type]
}
